add_library(CybertronBridgeBase STATIC "")

include_directories("${CYBERTRON_PATH_SOURCE}/CoreLibrary/include")
include_directories("${CYBERTRON_PATH_SOURCE}/Worker/BaseLibrary/BridgeBase/include")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/asio")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty")
include_directories("${CYBERTRON_PATH_SOURCE}/Protocol/Output/cpp")

IF (WIN32)
	add_definitions(-D_WIN32_WINNT=0x0501)
ENDIF()

add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)

file(GLOB_RECURSE srcs *.h *.hh *i *.hpp *.c *.cc *.cpp)
target_sources(CybertronBridgeBase PRIVATE ${srcs})
source_group(TREE ${CMAKE_CURRENT_LIST_DIR} FILES ${srcs})

IF(COMPILE_WITH_GCC)
	target_compile_options(CybertronBridgeBase PRIVATE -fPIC)
ENDIF()
SetDefaultTargetProperties(CybertronBridgeBase)

target_link_libraries(CybertronBridgeBase CybertronCore)
target_link_libraries(CybertronBridgeBase protobuf)

IF (MSVC)
	SET_PROPERTY(TARGET CybertronBridgeBase PROPERTY FOLDER "Worker")
ENDIF()
